import { Entity, Column, PrimaryGeneratedColumn, ManyToMany, JoinTable } from 'typeorm';
import { AnyCourse } from './any.course.entity';

@Entity()
export class AnyStudent {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  name: string;

  @ManyToMany(() => AnyCourse, course => course.students)
  @JoinTable()
  courses: AnyCourse[];
}